from django.urls import path,re_path
from . import views

urlpatterns = [
    path('register/',views.UserRegisterView.as_view()),
    re_path(r'usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$',views.CheckUserNameView.as_view()),
    re_path(r'mobiles/(?P<mobile>1[345789]\d{9})/count/$',views.CheckPhoneView.as_view()),
    re_path(r'login/$',views.UserLoginView.as_view()),
    re_path(r'logout/$',views.UserLogoutView.as_view()),
    re_path(r'info/$',views.UserCenterInfoView.as_view()),
    re_path(r'emails/$',views.UserEmailView.as_view()),
    re_path(r'emails/verification/$',views.UserEmailView.as_view()),
    re_path(r'addresses/$',views.UserAddressView.as_view()),
    re_path(r'addresses/create/$',views.UserAddressCreateView.as_view()),
    re_path(r'addresses/(?P<address_id>\d+)/$',views.UserAddressUpdateView.as_view()),
    re_path(r'addresses/(?P<address_id>\d+)/default/$',views.UserAddressDefaultView.as_view()),
    re_path(r'addresses/(?P<address_id>\d+)/title/$',views.UserAddressTitleView.as_view()),
    re_path(r'password/$',views.UserChangePasswordView.as_view()),
]